C code for PEGetGraphText and PESetGraphText

Use the following code as an example of how to call the PEGetGraphText and PESetGraphText functions:

PEGetGraphText

short             sectionCode,
    // The report section the graph is in
    graphN;
    // The graph number in the section
struct PEGraphTextInfo graphTextInfo;
sectionCode = PE_DETAILSECTION;
    // Graph is in Details section
graphN = 0;
    // First graph in section
    // Initialize size of graphTextInfo structure
graphTextInfo.StructSize = sizeof(PEGraphTextInfo);
if (! PEGetGraphText(Job, sectionCode, graphN, &graphTextInfo)){
    // Handle error
}

PESetGraphText

short            sectionCode,
    // The report section the graph is in
    graphN;
    // The graph number in the section
struct PEGraphTextInfo graphTextInfo;
sectionCode = PE_HEADERSECTION;
    // Graph is in Page Header section
graphN = 1;
    // Second graph in section
    // Initialize members of graphTextInfo structure
graphTextInfo.StructSize = sizeof(PEGraphTextInfo);
lstrcpy(graphTextInfo.graphTitle, "My Graph");
lstrcpy(graphTextInfo.graphSubTitle, "Product Sales");
lstrcpy(graphTextInfo.graphFootNote, "A Footnote");
lstrcpy(graphTextInfo.graphGroupsTitle, "Groups");
lstrcpy(graphTextInfo.graphSeriesTitle, ""); // No Series Title
lstrcpy(graphTextInfo.graphXAxisTitle, "X Axis");
lstrcpy(graphTextInfo.graphYAxisTitle, "Y Axis");
lstrcpy(graphTextInfo.graphZAxisTitle, ""); // For 3D graphs only
if (! PESetGraphText(Job, sectionCode, graphN, &graphTextInfo)){
    // Handle error
}


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com